# cmake_minimum_required(VERSION 3.0.0)
# project(demo VERSION 0.1.0)

# include(CTest)
# enable_testing()

# add_executable(demo main.cpp)

# set(CPACK_PROJECT_NAME ${PROJECT_NAME})
# set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
# include(CPack)
cmake_minimum_required(VERSION 2.5)
project(mymuduo)

# mymuduo 最终编译成so动态库，设置动态库的路径,放在根目录的lib文件夹底下
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
# 设置调试信息 以及 启动C++11标准
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11 -fPIC")

# 定义参与编译的源代码文件
aux_source_directory(. SRC_LIST)
# 编译动态库mymuduo
add_library(mymuduo SHARED ${SRC_LIST})